<template>
	<view style="background-color: #1BA9BA;">
		<view :style="{height: top + 'px'}">
		</view>
		<view :style="{height: height + 4 + 'px'}">
			<u-icon name="arrow-left" size="30" @click="back"></u-icon>
		</view>
	</view>
</template>

<script>
	export default {
		name: "Navbar",
		data() {
			return {
				top: 0,
				height: 0
			};
		},
		created() {
			let res = uni.getMenuButtonBoundingClientRect()
			console.log(res.top)
			console.log(res.height)
			this.top = res.top
			this.height = res.height
		},
		methods: {
			back() {
				uni.switchTab({
					url: '/pages/my/my'
				})
			}
		}
	}
</script>

<style lang="scss">

</style>